-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Follow up of #665: respond to more run states #899
Conversation
1) according to the spec there are other states we can handle in wait_for_run function, so I added those. 2) added termination msg param. 3) register_reply using invoke_assistant and check_termination_and_human_reply in order, so we can check for exit/human reply for human_input_mode != "NEVER". Remove the hardcoded human_input_mode. 4) return empty array if while loop terminates for some reason without returning messages from the state machine (while loop)
I recieved ``` openai.BadRequestError: Error code: 400 - {'error': {'message': "1 validation error for Request\nbody -> role\n value is not a valid enumeration member; permitted: 'user' (type=type_error.enum; enum_values=[<RoleParam.USER: 'user'>])", 'type': 'invalid_request_error', 'param': None, 'code': None}} ``` When using message["role"] which uses "assistant" for send messages but the API assumes only user role coming into new messages in thread. Not sure how it works for you without this change?
…ole for end state msgs
1) remove is_termination_msg 2) add external run cancellation 3) remove _wait_for_run and internalize through _get_run_response 4) process responses through _process_messages
Just removed unnecessary cancellation code. Check and recommend it for merging. |
Rest LGTM |
@sidhujag could we get a review? |
@gagb this PR is approved but I am not sure if you'd like to merge it from the discussion. Could you clarify? Thanks. |
I don't understand? |
There are conversations that are not resolved. And there are conflicts. I'm not sure about the plan for this PR. |
closing because of inactivity. |
* stratified group kfold splitter * exclude catboost --------- Co-authored-by: Shaokun <shaokunzhang529@gmail.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
@sidhujag added:
according to the spec there are other states we can handle in wait_for_run function, so I added those.
added termination msg param. Pass through kwargs to super()
register_reply using invoke_assistant and check_termination_and_human_reply in order, so we can check for exit/human reply for human_input_mode != "NEVER". Remove the hardcoded human_input_mode.
I added test cases
Why are these changes needed?
Related issue number
#665
Checks